Copied pool and small modifications

Small modifications here and there for the new compiler, also fixed a
bug with actor creation in actor manager