Added copyright notice to all files.

Optimized imports.

Reformatted some code.