Changed from double to float. Added viz part. Fixed bugs.