refactored index action
display errors in dev mode
added CRUD actions and view