Adding checking of project name, and some state improvements.