Changed gateways to use CachedRowSet
Fixed commands