Refactored objective funcs with exact gradient out of the FeedForward class