Made more object oriented.