Some minor cleanup, made test folder configurable.
Broken merge.