added pages.py to separate HTML and python code