Completed morse functionality