Fix erbs to use layout

Removed all the duplicate code in the erb's, except layout and index.