Finished first pass at backend. Now need to debug/
.