Cleaned up nested callbacks design pattern