Slight modifications and added schema for input network.