Added inverse() method, new test and related docs