db onCreate, onUpdate fix, and some minor fixes