Merge pull request #1 from thoronas/master

Added basic functionality.
WP style guide adjustments
Detect when first time through & page array is empty... in which case don't try to search through it
Wrap everything into a class
Add a couple of spaces, remove a couple of spaces
Switch from indexed array to associative array for clarity