Added classes for some encapsulation. Only first generation is working, *fix that*