Added GA code, minor changes