Extracted Listener from class. Changed resizing and som other properties