Code refactoring

Moved the command structure to commands definitions file. Fixed the names
inside the commands table. Added some TODOs.