More cleanup, remove some premature optimization