Coding standards, correct Ajax calling