Initial import
Test cases, some refactoring, 2 more exceptions