Reorganized, docs, test cases