Merge stuff from older Android coin project