added ajax type option and some minor changes