Major changes

Created standalone library for embedding, putted stuff in namespaces