more syntax fixes and cosmetic changes