Creating classes for every object and writing code