Major refactor to get rid of interfaces