Cleanup/some new functions