Handle JSON requests, add mime package