Some base funtionality to make unit testing easier.