improve reference naming
db fixes