Added more memory cleanup code, faster startup parameter