More changes

Was trying to get the unittest works but they are totally broken atm, we should probably fix them before attemtpting  moving it  to stackfoge