Refactor to become more object oriented.