Added most basic back-end code.