Refactor Piwik API wrapper into PiwikRequest