Structure cleanup, move to logging package