fixed issues with pjax, added first attempt at an API