Remove the useless declaration
Move helper functions for handler specs
Refactoring: Extract two lock functions into a macro
Extract config file into a single file
Define shortcuts to the service
Rename and Simplify the service

Implement the service as a record.
Remove the needless function