Change specs for automatic test controllers
Fix foreign key
Add RESTful controllers