refactor handler and importer lib in to packages.
refactor; move model.