Extracts prefix from config.

I hope it works I need to test it.