Reformat code
Fixed type hinting, only two warnings left