Merged the two 'Add code paths' (closes issue #32); and improved structure a bit (issue #26).