adding useful scripts and revised profiling pass (considers only depth 1 loops)