Improved function names and better handling of debugging subject number