added theme discovery and config parsing in theme