Added dual-license text
Updated API options, plus some refactorization.
Updated test example