some cleanup: TODO remove comments and format code