Added code for cammands. Not being used do to bugs I can deal with
later.