Read documentation, relocated some things
Actually tested code, noticed it was wrong