valgrind
better malloc/free
some refactor
formatting
flush out width and height
comments