Adding license and some minor improvements