Removed unused var
Fixed composer
Simplify code