Great assistance from @ThAOSteen on twitter.