added lots of javadoc + some abstraction
I missed some stuff