Structure tweaks, fixes #14 and #4