Fixed an import bug in decode and restructured files