Fixed bug #1 and added licensing