Added API class, completely reworked utils and views