Fix type hinting, set application context.