Added ownership adjustment and tests for apply_*!
Fixed coast dumping and parsing.