refactored how the classes called each other, and seperated them