fixed compile warnings and added license to new files.