Code cleaning, enhancement API