Initial version. Fully-functional, but with a handful of TODOs still outstanding.