Fixed everythin I broke (I think). Let me know if there's something wrong.