Final changes

-some final code improvements
-would like to do more but have finals to study for.