Building and compiling the networks