Issue #9 - Nested selectors, space before closing bracket in new line

Fixes to Issue #9 plus some basic unit tests