new handler package order and some small refactoring steps