Integrating with Stock Transfer System

This pull request as mentioned in the forum thread. I have not actually compiled this, but the core of the code is exactly the same, so it should work unless I made some typo.