CODE: worked on implicitly declaring more variables and cleaning up code.