some code clean up and an additional tutorial