changes applied after testing with bmi-tester.
A few fixes. Result is still six errors for 2 vars which are conditionally allocated variables that bmi-tester is not testing for so I think these errors are expected? @mdpiper would you mind commenting?