Functions almost completely implemented

Some glaringly obvious issues- for example, cells not updating when
format changes. Ready for extensive testing soon.