Port over the last of core/ and resources/.  Fix up type error in Webstorm with using typed underscore methods.