documentation
added global debugging to print statements (not enough time for log4j to be worth it)