Finally got pages working, still need to work on js