Cleaned up command checks. Corrected import statement.