Fixed warnings and brought up to date.
Added new test.