Fixed issues #9 and #13. Can now pull testing into master!