add some comments and cleanup of gen dir