Add license and update README
Fix small bug in config handling