Fixed $this used in static functions
Removed forced json request for api. Improved api controls