Initial import (separated form A::PW::Engine)