Fix transposed function names and indentation