Updated for BasePlugin v10.1
Formatting fixes.
Added SQL for sessions table.