removing all code outside of current scope