add init/deinit functions

This should help later when options are introduced.
add options