simple mixin and a few other functions for working with js objects