Separate unit tests, add docs