Documented everything, left some TODOS, and fixed a few minor bugs