Simplified mouse position code