Changed "#rows #cols" to "#cols #rows"
Added a controller script
stripping whitespace from input