Implemented mouse capture
Added special-case "document" selector for top-level container
More input stuff