minor improvements to elm code