A study of graphite and intercalated graphite by scanning tunneling microscopy