Initial AbstractGateway refactoring
Improve phpdoc