updates

- use penalty constrain to enforce bcd
- corrected some bugs in preproc and uel (lib_bcd must be placed before
lib_elem since the latter uses the former)
- unified the codes btw linux and windows machines
- this set of codes seems to be working correctly