Minor refactor to make code easier to read
Actually remove dbpath