Modified MainActivity to access word database