Initial refactored codebase with nodes