Made some improvements to the gateway communication layer, and added the BTCinch php lib to separate plugin code from BTCinch functions.

More...