Improve variable definitions and history settings; closes #2