Usage of global functions begin and end when possible instead of class ones.