update gradle and make some minor improvements