Changed user to username and updated some missed variables.