Added Debug Function

Very basic debug function. Will be expanded