Removed redundant anonymous functions