Added test coverage and cleaned up config