added in page length and javascript fixes