Add some comments/documentation and
perform code cleanup