Refactor LocoTerm

- Converted LocoTerm class and other methods using locoterm arguments as separate classes. 
- Documentation is not changed yet.
This line should be moved to between line 108 and 109.