Is now a usable version, but not especially pretty/elegant