clean up, comment code better