Trying to make application work properly