Remove unused button type
Use custom logging lock in database module
Remove excessive locking in database