Added comments, deleted old code