Major changes sto status pig script. Optimized parallelism of previous state computation and site retrieval. Cleaner expressions and parameters