restructured project and added math-environment support