Rewrote the backend system with a Backend class.