remove redundant type declarations and format changes