Migration fix
Db fix
Db fix
Moved form elements to rails form helper methods. Added some of associations and validations to models