Add helper method and cleanup