JavaScript page changing, other improvements