NOD-3 - Refactor code to be more modular.