Implemented modular-scale and updated type calculations accordingly