refactoring and improving on jterm related classes