Patterns And Best Practices In JavaScript: Dealing With Callback Functions