Updating GA code.

The code does not run and require some bugfixes