Rename files; improve def spec
Testing and refactoring