REFACTORED LOTS OF CODE. INCOMPLETE. ADDED SKIPWORKER