TODO notes and some cleanup