Removed unnecessary delegates and replaced with blocks