Added hooks system, and moved active container concepts to hooks