Fixed bug in flattened selector.

Added back .clearfix to tools div, and use parentsUntil() instead of
parents() to prevent positioning the searchbox wrong in sub-forms.