Code cleanup, documentation, and new constructor with MTF.