Debug version - stable but a lot of debug code that needs to be removed