Updated tests to work with refacted code