refactored some redundant code
updated page layouts