Style and cleanup fixes.

- Spaces instead of tabs
- rename cfg files to something more likely to be unique
- Organize files by function type