Basic refactor to more modular and independent arch