Added exercise api and some other fixes