A few changes before implementing jquery, and move sql to sql dir.