Reformat, remove a few redundant type casts