Refactored everything works now