Added detailed comments to Engine.hs