removed what would be a big memory leak and code cleaned up more