Fixed the equation error in Issue #7.
Squared omega, fixing issue #8.
Fixed the hat, closes Issue #4