moved functions to corresponding classes: Application.get_key_file_path() and Context.get_instances_by_app_identifier_and_state()