Update dir structure and fix PI defn