Added support for Mod Sorting

Javadocs and indention