Fixed bugs, updated docs, and added example MainActivity.