move message to correct location and fix jsLint errors