add exclude patterns, many other fixes