some comments and cleanup