Changes made per Atsushi Enomoto's suggestions to fix issues with wrapping GoodDyn library