Changed inline type annotations into local definitions
Changed internal function definition type syntax