Adding support for getting the frontmost application