cleans up application