Cleaned up base/backend and added tests for it.