Refactored some classes internally for better extensibility; nothing major