Added function backend, updated display page to use it instead.

Changes reflect updated database layout.