Added fork possibility. Added SQL script