lyner: Mixed up conversions. Couldn't find original reference I used but found a correct version. Implementation should be correct now. Added more tests for exceptions