Fixing some issues with the model, generating views and controllers