extract messages for localization
add exception management and rename some class
remove unused code