added size restrictions to matrices in matrix mode. Added scheme
configuration in Gruntfile