lots of categories i used in objc, rewrite in swift, more coming.