Corrected two minor errors.
Implemented a test.
Merge remote-tracking branch 'origin/back-end-working' into back-end-working