Tried to add some OOP in the project

Tried to add OOP features in to the project, but I'll have to check the
manual first.