Restructurize api