Improved API a bit