Massive clean up
Fixed class detection logic in command
Hacking.