xbrick element bugs fixed, now preproc

working now on preprocessing matlab code