Fixes for CSS completion and also generalisation of doc handler for all simple cases with optional completion.