Reorganization into lib, work on Dash

Gonna be easy and fun, but seriously. WTF is going on?!