Added license, implemented mode setting