Added cleanup function, created Draw function, documented some code