Made API more consistent