Cleaned up api a bit for consistency