Some fixes. TODO: fix commented out example.