Moved logic out of classes to DBUtils awaiting refactor