Refactored scale scripts

Also added more mask types