Refactor petool, add support for removing sections