Fixed tabbing
Added error handling to api