Replaced classes with interfaces to make the code more general.