Added scala package objects to clear up some weirdness.  I'm not sure I
fully understand them though...