Added buttons at bottom. Shifted work to api