refactored ConfigController; created sendError plugin