Moved printer list code from listprinters into printer class and added tests