Updated to provide basic (and buggy) PIV functionality