added possibility for loading wav sounds and removed some redundant code