Refactored all the tests to have the same consistent style and
minimize the number of times embedded titan gets open. Tests now take
2 minutes instead of 15.