Added Active record model and rake tasks.  Also added all rest call functionality.