RE: The sword.
The most plausible theory is one based on something that is said in very brief passing, in two cases.
Book 2 - Dumbledore - Only a true Griffindor could have gotten the sword out of that hat.
Ok, thats a lame explanation.
BUT, in 7, at Harry's Birthday, Scrimgeur arrives and tells Harry that DD wanted him to have the sword, but they weren't giving it to him. He also says that, historically, it has been shown that any true Griffindor could summon the sword from the hat.
So the theory is that because Hat *and* Sword were Godric's, he enchanted both. A Grifindor in need with the hat could summon the sword. It didn't matter where the sword was at the time, the sword would come.
A permanent accio on demand, if you will.
At least it fits the events...