Cleaned up code a bit and fixed next page bug