Follow jshint suggestions
Working on better dialog implementation