cleaning up code, starting to style to google guidelines