Added extensive notes within the code and removed functions not being used