beautify ajax calls, pattern for cal existence check, DatabaseHelper draft