Uses a layout template to encapsulate views
Refactors items that deal with database to IdeaStore class