Update BoxController.java

Updated the save function to work with the new datastructure. Also split it up into several functions, to improve readability and decrease lines of code. Also updated the test thing at the start of the constructor to work now.