routine_nesting, bunch of comments, cleaned up, etc