Adding documentation explaining idealstate in detail, fix from Alexandre