some comments and cleanup; will add more comments once Xcode 6 supports documentation comments or I figure out syntax it expects for them