Fixed location order, renamed db class