Refactoring: Use the db inner transaction and rename the lock function
Use new repository apis in screen
Implement some page handlers and add tests for them