Add missing dependencies to .cabal; remove unneeded imports.