Fix access modifiers
Improve genericity and pool code