Code cleanup and some optimizations. The code is also now more flexible, removed PEX depency, removed temp freeze command (because it was too bugged),  #Heil OOP