added sound support

pretty crappy sound support atm
fixed several bugs with memory dealloc