Major changes to structure, added import functionality