Code cleanup. Removed unecessary imports, declared variables as final if possible