fixed many memory leaks
added working shadows, using basic shadow mapping