Moving creation and destruction to appropriate methods.