Optimized imports.
Added some more comments