Added import test and error printing. Also added new base class for commands.