Reorganized code. Added pages.