Rewrote import process. And some minor fixes.