Update code based on @buddycloud experience