Moved things around a bit to fix warnings in users of this package.