Add user age check, tidied up code