Refactor completion detection.

Signed-off-by: yrammos <yannis.rammos@me.com>
Rebase on dev branch.
Reinstate README.md