Move #source helper method to ui