cleanup regexp and add Library