Expanded definitions and improved commenting