Neatening the code