Really big pull request!

Hi Bin,

I'm attempting to add my contributions the main repo. As a forewarning, I'm not that comfortable with git and am a little nervous about the whole merge process so I've made several back ups! I've triple checked though and every thing looks good to go. You should look to! 


I am crossing my fingers,
Jordan