Faster resize calculation; Cleaned up Makefile