added more comments, removed commented blocks
minor formatting