Refactor code for future Oracle support