Added optional annotations
Fixed some issues.