Fix various issues in core module of lightblue-migrator