Add kernel directory.
add support for getattr and access. fix some segmentation