removed unused imports
modularized lm compilation
edit docstring
vocabcompiler now takes arguments (useful for testing)