API routing improvements and implementation