Backend: Make functions return integers.

This makes "main" return an integer -- 0 on success -- to the OS.
Closes #92.
Merge branch 'backend-exit-code'