Added Callbacks for API

Added some callback to API, moved data so it could be cached and not
reinitialized needlessly.