some more comments and cleanup