improved ajax php interface and misc.
Merge pull request #14 from BenLorantfy/ben

improved ajax php interface, prepared statements, and misc.