Putting code into classes

Hi