some cleanup, some comments