changed the log window, added messages in Controller, some refactoring