Remove console part from functions