Unnecessary function calls removed