Ng modularization and routing

Closes 114, 115, 112, 87, 88