Added some returns and fixed indentation