Added main lib and specs for it.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>