style fixes and change to API