refactoring, cleaning, added some message windows

+ some interface fixes