alternative implementation of updatePredState
Merge pull request #114 from tnantais/develop

alternative implementation of updatePredState
delete old updatePredState method
refactor settings code
refactor custombutton code
refactor appdelegate code
refactor viewcontroller code