Beginning of redesign
AMD format refactoring; fixed tests