fixed issue with db handler opening too many connections. also made it a bit more go-like