Code enhancement for loadController and NotFound