Add javadoc
Add logs
Optimize search of non empty position
Update unit tests