Continue moving panel-specific code within panels.

Structure the SQL and template panels as packages as they're growing.