#15: straightening out db connection issues. WIP