Improved gui interaction and fixing some tof_range issues.