Final tweaks and integrating aicore library