added basic pagination
js formatting fixup