Initial API commit

Still much work to be done.