change apparently required by Xcode 6 beta 2
updated swift syntax
make shared object accessors class variables instead of class methods
more syntactic fixes
use !isEmpty instead of count > 0, and map/reduce methods instead of global functions