Merged your work and fixed most of the issues I could find

Should be fully functional again (unless I missed something) in case you want to work from here, thanks again to make the code a lot cleaner :+1: