Fix indentation, minor refactor