Moved most of the logic from Style into Selector
Fixed a few bugs