fixed some memory leaks
updated entry point

added crt memory leak detection under windows
removed hard coded square
properly deallocating objects