Refactor ini for better standalone use.