Large-scale code cleanup. Also adds a license to the top of all files that were missing it.
Fixes issue where Viewer node wouldn't pick up correct length if a tracks weren't in use.