Lots of specs and code restructuring