some cleanup and futzing with relative imports