Moved Stackclear to individual functions for safety
We don't want to wipe the stack if we recive an invalid command