Use const ref instead of ptr for states update+features