Added part of the output tone generation
and added license headers...