Refactor pages to use nested attributes