Major rework; hopefully last one. Now has better support for ipad/iphon/desktops and is more lightweight in the javascript