Adding changes recently added to release 2. Includes rewrite of margin code, fixes for duplicate DataFormat, and cleanup of files I noticed that was 1 line.