Refactoring custom layout to use layoutImpl. Unit tests pass. Still a bit more work to do.