More doc comments + unit tests