Adding options support - containment and some code clean up.