Fixed bugs and updated documentation. Made example MainActivity.