Further refactoring of initproject.py