Add more comments and make the code a little more descriptive