More notes and misc code