Restructuring to the derivate process, documentation, more tests.