Implemented rendering for debugdraw; some refactoring from the original implementation