The pm routine needs to be worked on. In particular, the traceback isn't very intelligent and basically prints out the stack itself, leaving the user to figure out what the numbers mean.