A few visual tweaks. Also cleaned up the code/added more comments