BUG: Fix memory leak and reduce drawing fidelity