More Promise replacements.
Use long stack traces in tests.
Code is less susceptible to throw sync errors.
Minor code simplification.