Improve syntax validation. Fix building for net40 target