simplified the STI logic.

and whitespace!
improve integration test