Prevent setup recursion using tp_enabled
Less greedy and smarter magic url removal
Add core unit tests
Whitespace fix in travis.yml