Supports multiple layouts and file types. closes #1