Defining helper classes. Added Position class