little design and performance fixes