added layout.erb and changed the architecture to altertate the views