Added some support functions, removed Google code.