final refactoring, bug fixes, onion soccer changes