Refactor and reset database to attempt to solve nil problem. Unsuccessful.