Removed redundant functions getPageX and getPageY
Moved some util functions to util.js