Changed some tabs to spaces, corrected indentation