Setting up the NIPN structure