Major update. Splitting the asset server from the gateway

Also, major fixes in threading and lock contention