Added a system test and fixed all the thing I broke before in the process