Added api for all functions in index.php. Need ray to add parsing.