Adding the Apache 2.0 licence header + encoding stupid bug fix