Fixed issue #14.

All finished. Please merge in.