Added --clean (-C) option for 'build' and 'run' commands to be able to clean project before starting.
Removed some code duplication in command actions code.