Added pi to externals
More bugs added