refactoring
add hooks and update default options for edit window