Added a logger, nothing fancy
Index implementation
where() tries hard to pick the right index