Added comments, variable names translated, removed unsued imports.