Refactoring, more checks, etc.
Add some experimental features that may fix issues on Samsung phones
Version bump
Commit version 1.6

Many changes, including refactoring and hopefully a fix for the Samsung
issues