finalize greenhead integration and fix bugs. Add new methods to facilitiate the integration