Logic work.

 * added additional definitions
 * updated definitions
 * annotated