Refactor

I got rid of all the static numbers and placed more comments throughout the code.