Added commenting and cleaned code.