WIP: Clean up config code