Fix logger and Element representation.
cleaning and reformating.