Cleaned up code and added product api