WORK IN PROGRESS: Add unit tests