Cleaned up code offloaded to backend.
Fixed typo.