Code Cleanup

Documentation + cleanup pass - phase 1