Added support for running on Android. Removed memory leak, per exercise goals.