Added more functionality to the debug() function, removing the requirement to scatter bitspace.debug checks throughout the code.
Usage of updated debug function:
debug() returns value of bitspace.debug
debug(string) prints text to console if bitspace.debug is true
debug(boolean) sets value of bitspace.debug