code cleanup and code style (PSR-2) fixes in commands