indentation, and fixing incorrect function names