Added template buffer function to class.misc and added params option for getAjax in functions_misc.js