reformatted the styling and fixed minor refreshing bugs