Refactored RPIClient and handler to use an abstract parent