Made some improvements in backend