Rework lsm scanning engine
More usefull changes, but still doesn't work