Improve samples editing; improve UI; fix caching