Refactored comments, local settings logic and copyright notices.