finalized

cleaned up file, removed useless lines, added some comments.