Adding unit tests for the core.
Cleaning up and adding CONTRIBUTING.md