Reworked nearly everything