Re-add/update smartmax and smartmax_eps from maxwen sourse