Optimizing Code, might break stuff tho