Fixed reference errors, enabled migrations
Configured migrations
added membership entities
Merge with master.