PI is removed. Some bugs are fixed.