refactoring fw_handler.py code
Merge branch 'api-services' into api-core