Finished the implementation of the command queue. The code might need polishing and the function "getCommandFromQueue" should be renamed to something more meaningful.