issues #5 and #6

just the very same stuff i wrote about in the issues for you to review... and merge if you wish :-)