Cleanup, comments, formatting