Fixed #prepare not emitting error
#prepareForBattle now can be chained
Fixed custom errors stacktrace capture
updated tests
updated tests