I was working on the same thing last night- ha!
I did a little example addon for others in case they get stuck too. Not as detailed as your stuff, but might help others get off the ground. It is @
https://github.com/ChrisNolan/TestAd...hor=ChrisNolan