lib cornerstone and main interface