rest_client.find_application(options.namespace,app)

should be

    rest_client.find_application(options.namespace, app)

everywhere