Try to refactor some methods, add method for each dialog