FIXES: Solved memory leaks.