Using a bunch of code from Google I/O App