Fixed errors revolving around not opening/closing database. Other errors
still persist.