Refactoring & initial development of motif tool, integrated with programs in thor server