Did some more stuff.

-Outlined Projection function
-Cleaned up code and added small utilities