New update and some code clean up