Added several core functions. Introduced _ki object for holding modules
and vars