got rid of unused things and fixed indentation.