more review comments, cleaning up the code