include i18n related header
remove needless code
fix mixed declarations and codes
integrate ui related code to main source