Overhaul to fix all issues