move renderer code to its own file
updated makefile