Cleanup/codebase

initial cleaning up. some document + comment love.