Adding WebAPI

These commits still contain many bugs