Optimized and reworked version of Kinfu