Use parseInt when dealing with integers.
Use parseFloat instead of parseInt.
Use a bigger number of units when converting to pixels.
Added a small http server.
Added a demo test page.