Fixed a bunch of SQL stuff.
Abstracted out the pattern to match the Top X requests. Fixed a bug in the Op List processing. Fixed a bug in the queue reporting. Cleaned up some debugging messages.
Added in a SQL call to get popular items