Refactored code, removed unused classes, fixed (again) random tick