Fix nil dereference: Limit repo's scope to conditional so there's no nil pointer anymore.
Cleanup exec code.
Docs update