some cleanup, remove comments, edit var names