fixed memory errors and leaks
removed .o files