Simplyfy callback inner functions making them anonymous. Also encapsulated the hanging —self executing— parentheses per Crockford recommendation