Rebase cleanup, comments and nesting