Cleaned up and documented
Added missing files from last commit