Fixed references to Rectangle to avoid conflicts with VS and removed some debug output.