Bug fixes galore

Thread stall on gateway

Occasional asset on asset server

General throughput improvements

Code simplification on gateway