Added line and dots removal function