Cleaup unused attributes and typedefs