Convert DOG to use new command API, code inspection, Fix potention NullPointerExceptions