Updated to use OpenShift helper methods. Turned agent into a class