Refactored Piwik support for better readability and extensibility. Added a couple more custom variables (Sort, Page, Limit, View) to search tracking.