Still trying to fix the mem leak and the rendering crap