Make popup mode controllable from the database for #50.
Update schema to match database -- seems to be mostly non-semantic changes. Used the Migrations tool; I think I normally use the schema tool. Related to #50.