[BUGFIX|FEATURE] Commenting, cleansing & bug-fixes

 - added few more comments
 - rewrited few unnecessary or suspicious parts of the code
 - fixed bug with reading and writing WAV files with BytesPerSample
   element more than 8 (bits), supported are only 8 and 16 bits,
   others are not commonly used
 - Window function may not be used as it after this bugfix did not
   provided much improvement