Migration of code from ThinkNear/eb_example repo