Move InvUtils to api package and remove unused imports