minor
make it work with root cloth
add a lot of debug statements
fix array add/remove removing the last element