Simplifying main function and un-exporting network internals