CLN: move compose to tools.util
CLN/DOC: flesh out docstrings and make tokenize_string more succinct