Cleaned up API a bit.