Remove op-specific free function, formatting, make more functions static.