Code Cleanup & Documentation