Move config to separate file
Add module loading code
Move thread links into module