update layout to use format and calculatePages, properties array
split up layout functions into format and page calculate