Modified helper scripts and added perfect math q=1