Shuffle #include's and add licence.

Fix example so it compiles and runs.