Code cleanup. Mainly remove unnecessary imports and make variables final.