Made mod into few classes