Small fixes1

This is the first part of PR #92 rebased on top of current 1.5.2. I'll do the second part once this get's noticed and (partially) merged.

Just so it don't get lost /cc @addyosmani.