Design, Tests

Modified design and tests.