Refactor Source

Analyzed by Android Studio, includes
* Security Fixes
* Lint Issues

Change-Id: Ia08ba7cbf0c96d6c2191a78ba5e1ba59befad515