Sorting out class structure