Removed debug stuff/fixed some testing bugs