Added sufficient licensing and minor improvements