added some automated tests to discover issues in the layering