Uncle Fran's second pull request

Final code for testing. For some reason you may need to merge this manually. I'm sure Dave will be more than willing to help. :-)