New approach

I rewrote everything (mostly on the plane ride from NYC); we should be able to use this to build apps now.