Fixed the return statement in the update() method. It was using a redundant ternary operator.

Removed unused imports.