Code cleanup

Streamline, optimize and describe the code.