Made adjustments to tests and production code