Added more error checks, window/melfilter generation