Cleaned up ui.js quite a bit, getting ready to convert all mouse and touch events into a single event. Oh and lines kinda work sort of