Add GPL headers, tweak variable and return value tests