It doesn't look like the contract is ever paid here. Is this a miscode or am I reading it incorrectly? Where does the exchange of ether occur?
function buy() payable returns (uint amount){
amount = msg.value / buyPrice; // calculates the amount of token
if (balanceOf[this] < amount) throw; // checks if it has enough token to sell
balanceOf[msg.sender] += amount; // adds the amount of token to buyer's balance
balanceOf[this] -= amount; // subtracts the amount of token from seller's balance
Transfer(this, msg.sender, amount); // execute an event reflecting the change
return amount; // ends function and returns
}