removed unused functions, and fixed the indenting