Refactored GDB code into a number of classes