Made some slight improvments to the code