Remove model dependency on lib/db