Logging removed, code reformatted