Reorganize and clean up.
Fix api urls