Added changes from ElementalX

Added code/chnages from ElementalX Kernel.