added functions; cleaned up page layouts