Resolved swift 1.1 version.

* Fixed to new swift version
* Fixed entity manager