Many fixes

Finalised the command system
Finalised the setrank command
Fixed several bugs