Fixed eta()
Refactored
Updated to reflect recent changes