Added encoder.h/.c and iosetting.h/.c
Updated some header and code files.