fix indentation
Don't access static variable with "this"
Clean code using generics

Remove unsafe type conversion