Closes #95: defining local variable and fixing args check