minor improvements

1) use final variables
2) remove unnecessary generic declarations
3) fix synchronisation issue in Lifecycle.java
good catch...