Fix minor bugs and optimize requests