code and notes cleanup