refactor: convert annotationProvider into a function
refactor: bootstrap and event handler