Adding More Tests

Some refactoring, too.
werwer

werwe