API extension and cleanup