added missing doctests; exception handling; etc.
added missing doctests; exception handling; etc.

gerald1248/minimal-scalable-template,gerald1248/minimal-scalable-template,gerald1248/minimal-scalable-template