Code restructured, Page setting form added