Misc housekeeping + fix for #136 in PhoneJS implementation