Add functions and hooks for activation/deactivation; implement table data structures