Added code from beta archive