Somre reworking to get all the debug related code out.