removed rules and added functions to clean up instance