more comments and cleanup