Made plotResPhase a class for easier manipulation