reorganized some code

renamed a few files
moved the enum mapping to one file
modfied a  test for bsp_layou and fixed a bug