Add Apache 2.0 license and headers, fixes #1