Added AIMap for large scale reasoning

Also fixed some serialization issues