Initial commit based on the work done so far.

Currently everything "works", but isn't really very polished.