Added license and some docs.
Pulled in most functions from pkg flag.
Added an example program.