packed modules in different files. finalized pure C version.