Adding framework for removing extra newlines