Moved common header script operations to separated library