Add jsr305 annotaions, refactoring