Fixed ajax bug & created entities

Fixed ajax bug & created entities