Code cleaning as suggested by Chris