API finalized, error-fixing

API should be all as is. Needs testing.
TODO updated