Cleanups and simplifications to increase code clarity

@samccone 

You replaced:
> x = Math.max(0, (this.selected === 'main') ? this.width + e.dx : e.dx);

with 

> x = Math.max(0, this._mainSelected() && (this.width + e.dx));

Did you mean to do:

> x = Math.max(0, this._mainSelected() ? this.width + e.dx : e.dx);

?

Same goes for the fallback assignment to `x`.