Added multiple page support (still needs some UI work done)