Add simple unit tests

Also adds necessary libraries and stubs.