Added support for unit annotation of the first level only, fixed bugs in error reporting