Commented everything, fixed some bugs, culled code