Refactoring and annotations fixing.