Fixed PCB code and cleaned up the memory class