Source formatting and origanize imports.
Removed all unused vars, added type arguments to all raw types.