Updated project prepare function