Formatting, add missing annotation, add unit tests