fix indentation, spacing and nestings