fixed a couple classes, reorganizing things in a way that makes a bit more sense and should fix the issue with dynamically created objects