finishing with api-core refactoring and firewall service
adding last code refactoring to api-core