Make code better

Just a few small changes to the code.