fixed a crash
Selector is now optional
Lots of stuff
fixed merge conflict