Updated to 2014 JS patterns.