here i fixes #3 and perhaps fixes #1 ?

Awesome job! Go ahead and merge this back into master.