Optimized imports.
Fixed minor bugs.
Reformatted code (PSR-2)
Fixed minor issue