cleaning up code in docs