Theme parsing, better lookup, tests