Added buy/sell tables, repo functions and create + index