revamped the code a bit to allow multiple per page (for archive views).
Added some hooks/filters to allow custom buttons
cleaned up some of the syntax