Most credit goes to: Roman Skylarov Additional integration and refactoring by myself. *** COMPLETELY UNTESTED *** Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
Change-Id: Ief00cc9243af3168f0c088520936137b64f3b581