Rename some variable names in db.py for clarity
Add DB code to register stacks when created

Also update block creation code for proper commits to database
(creating block does not create stacks, necessarily, so remove that,
etc.)