refactor behavior service and minor changes