lots of bug fixes, added select tool

next will add ui behavior for selected elements