Large-scale code cleanup. Also adds a license to the top of all files that were missing it.
Implementation isn't perfect yet, viewer/renderer doesn't update yet when the preference is changed so a sequence needs to be re-opened for the change to take effect.