Reworked modularisation to give modules their own namespace