Finished refactoring of LoT
Included test of the LoT-expanding widget