Added some explanations and changed some naming conventions