spec declaration cleanup
path replacement function checked