refactored to remove Application.getComponentObject[A]() which is not
typesafe and can cause runtime class cast exceptions