model refactoring

refactored step insert as a method
moved getAuthorisedViews to helpers