Code fixes. Finally make it work.