Added unit tests, gitignore, build-system and fixes