Cleaned up code a bit. Now onto exporting network, and then trilinear interp if possible