Change local static access to self
Remove unused fields