some fluent api and handler refactoring