Rearranged API and added purchase button.