complete rewrite using ExtJS best practices