* Protect states that are the most recent states of their entity * Also protect events * Some documentation * Fix SQL