- remove unused variables
- fix wrong use of variable
- fix format string
- syncronize accessor method for singletons
- fix possible null pointer exception