cleanup, readded some comments