Initial working commit

Ugly and fast, but functional.  Needs cleaning, reorganizing