Restructure API for better chaining