working commit. Large changes to backend.