Updated to reduce newlines created when opening and creating formatting