Merge pull request #19 from williamjacksn/r4

Fix missing optional arguments
Safer, more restrictive optional argument fixing