Added apps model & controller

pr for issue #2