AutoControl: Cleanup and refactoring, added settings for automatic JA usage